import random

class Generator:
    def __init__(self, times):
        self.times = times
        self.list_out = []
        temp = [i for i in range(1,20)] #建立一个代抽样序列
        for i in range(self.times):
            n = random.randint(2,7)
            list_temp = random.sample(temp , n) #从 temp 中抽取 n 个元素，构成元素不重复的数组
            self.list_out.append(list_temp)

    def outPut(self):
        return self.list_out

if __name__ == "__main__":
    gen = Generator(3)
    print(gen.outPut())